﻿Public Class ComplaintController
    Inherits BaseController(Of Complaint)
    Public Shared Function loadByEmp(ByVal ID As Integer) As List(Of Complaint)
        Dim query = From i In dbo.Assignations _
                    Where i.EmployeeID = ID _
                    Select i.Complaint
        Return query.ToList()
    End Function
    Public Shared Function loadByStatus(ByVal Status As String) As List(Of Complaint)
        Return load().Where(Function(i As Complaint) i.Status = Status).ToList()
    End Function
End Class

Public Class ComplaintStatus
    Public Const Pending As String = "Pending"
    Public Const UnderInvestigation As String = "Under Investigation"
    Public Const InvestigationCompleted As String = "Investigation Completed"
    Public Const Closed As String = "Closed"
    Public Const Cancelled As String = "Cancelled"
End Class